function [CNC1history,CNC2history,CNC3history,CNC4history,CNC5history,CNC6history,CNC7history,CNC8history]=record(CNC1history,CNC2history,CNC3history,CNC4history,CNC5history,CNC6history,CNC7history,CNC8history,index,nowtime)
    switch index
        case 1
            CNC1history=[CNC1history;index nowtime];
        case 2
            CNC2history=[CNC2history;index nowtime];
        case 3
            CNC3history=[CNC3history;index nowtime];
        case 4
            CNC4history=[CNC4history;index nowtime];
        case 5
            CNC5history=[CNC5history;index nowtime];
        case 6
            CNC6history=[CNC6history;index nowtime];
        case 7
            CNC7history=[CNC7history;index nowtime];
        case 8
            CNC8history=[CNC8history;index nowtime];
end
